package com.ll.stringbuilderdemo;

/**
 * @author 刘龙
 * @version 1.0
 */
public class StringVSStringBufferVSStringBuilder {
    public static void main(String[] args) {
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append(1).append(String.valueOf(1));
        System.out.println(stringBuffer);
        int length = stringBuffer.length();
        System.out.println(length);

        StringBuilder stringBuilder = new StringBuilder();
        int length1 = stringBuilder.length();
        System.out.println(length1);

        System.out.println(stringBuffer.charAt(0));
    }
}
